c1_f = filter(1/5*ones(1,5),1,c1) ;
c2_f = filter(1/5*ones(1,5),1,c2) ;
c3_f = filter(1/5*ones(1,5),1,c3) ;
max(c1_f)
max(c2_f)
max(c3_f)

mean(v1)
mean(v2)
mean(v3)
v=[v1;v2;v3];
c=[c1;c2;c3];
c_f=filter(1/10*ones(1,10),1,c);
f_type = fittype(@(a,b,c,d,x) a+b*exp(-c*x)+d*x,'independent','x','dependent','y');
f = fit(v,c_f,'poly1')
plot(f, v, c_f)

% f = fit(v,c_f,f_type)
% plot(f, v, c_f)
% 
% fm = fit([mean(v1); mean(v2); mean(v3)],[max(c1_f); max(c2_f); max(c3_f)],'poly1')
% plot(fm, [mean(v1); mean(v2); mean(v3)],[max(c1_f); max(c2_f); max(c3_f)])
